<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>来呀、斗图！！！</title>
	<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/js/bootstrap.min.js">
	<link rel="stylesheet" type="text/css" href="__CSS__/barrager.css">
	<style type="text/css">
		html,body{
			height: 100%;
			overflow-y: hidden;
			background-color: #000000;
		}
	</style>
</head>
<body>
<audio src="http://www.ecode.com/index/images/sysd.mp3"  autoplay="autoplay"></audio>


<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.barrager.js"></script>
<script type="text/javascript">

//每条弹幕发送间隔
var looper_time=1*1000;
//是否首次执行
var run_once=true;
do_barrager();

function do_barrager(){
  if(run_once){
      //如果是首次执行,则设置一个定时器,并且把首次执行置为false
      looper=setInterval(do_barrager,looper_time);                
      run_once=false;
  }
  //获取
  $.getJSON('{:url("Fightimg/popimg")}',function(data){
      //是否有数据
      if(data.info){

           $('body').barrager(data);
      }

  });
}
</script>
</body>
</html>